{{ $videos := sort (where .Site.RegularPages "Params.episode" "ne" nil) "Params.episode"  }}
{{ $img_suffix := "" }}
{{ $dimensions := "" }}
{{ if .IsNamedParams }}
{{ $img_suffix = .Get "img_suffix" }}
{{ $dimensions = .Get "dimensions" }}
{{ end }}

<div class="two-column">
  <div class="column-left">
  <ul class="video-thumbnails">
    {{ range $i, $video := $videos }}
    {{ $group := mod $i 2 }}
    {{ if eq $group 1 }}
      <li>
      <a href="{{ relURL "video" }}/{{ $video.Params.link }}"><img src="{{ relURL "images/video" }}/ep{{ print $video.Params.episode $img_suffix }}.png" {{ $dimensions }}></a>
      <h4>
        <a href="{{ relURL "video" }}/{{ $video.Params.link }}">{{ $video.Params.video_title }}</a>
      </h4>
      <p class="description">
        <strong>Length:</strong> {{ $video.Params.length }}
      </p>
      </li>
    {{ end }}
    {{ end }}
  </ul>
  </div>
  <div class="column-right">
  <ul class="video-thumbnails">
    {{ range $i, $video := $videos }}
    {{ $group := mod $i 2 }}
    {{ if eq $group 0 }}
      <li>
      <a href="{{ relURL "video" }}/{{ $video.Params.link }}"><img src="{{ relURL "images/video" }}/ep{{ print $video.Params.episode $img_suffix }}.png" {{ $dimensions }}></a>
      <h4>
        <a href="{{ relURL "video" }}/{{ $video.Params.link }}">{{ $video.Params.video_title }}</a>
      </h4>
      <p class="description">
        <strong>Length:</strong> {{ $video.Params.length }}
      </p>
      </li>
    {{ end }}
    {{ end }}
  </ul>
  </div>
</div>
